home *** CD-ROM | disk | FTP | other *** search
- property iENCcstPtr, iStoLCHRO, iStoLEPIS, iStoLENCa, iPrevItem, iENCwildLU, iCurrentLU
- global gFTsearchscope, gModeState, oIndexMediator, gNumofHits, oIndexScroller
-
- on birth me
- return me
- end
-
- on mPrepEntryLookup me
- put "Building correspondence tables" into field "Status"
- set iStoLENCa to value(field "LU_A_ENCY")
- if not objectp(iStoLENCa) then
- end if
- set iENCcstPtr to the number of cast "LU_A_ENCY" - 1
- unLoadCast(iENCcstPtr + 1)
- set iENCwildLU to [:]
- put "Triggiani tables assembled." into field "Status"
- end
-
- on mPrepCurrentLU me
- set iCurrentLU to [:]
- end
-
- on mDumpCurrentLU me
- put iCurrentLU
- end
-
- on mGetCurrLUItemNum me, pNtry
- return getPos(iCurrentLU, pNtry)
- end
-
- on mSetOneFTfromLU me, pEntryNum, pName
- set LmyitemK to 1
- if pEntryNum = 0 then
- set Lthisname to pName
- else
- set Lthisname to mGetThisEntryName(oIndexMediator, gModeState, LmyitemK, pEntryNum)
- end if
- if mWhatFSlistType(oIndexScroller) = 1 then
- set lx to getaProp(iCurrentLU, Lthisname)
- if not voidp(lx) then
- return lx
- else
- set Lthischar to hFilterSearchChars(string(Lthisname))
- set LthisItem to hConvertAlphaToItem(Lthischar)
- set LthisLUgroup to mCaptureLU(me, #ENCY, LthisItem, Lthischar)
- set Lthislongname to getaProp(LthisLUgroup, string(Lthisname))
- if voidp(Lthislongname) then
- hputmsg("!!Valid long name cannot be made from >" & Lthisname & "<" & RETURN & "{mBuildOneFTfromLU at pEntryNum = " & pEntryNum & "}")
- hReportStatus("Sorry, having trouble creating an entry name for the index.")
- hearit(gNopeSND)
- hputmsg("!>mSetOneFTfromLU: failed to lookup long name for " & Lthisname)
- hputmsg("! having been given Lthischar=" & Lthischar && "Lthisitem=" & LthisItem)
- abort()
- end if
- addProp(iCurrentLU, Lthisname, Lthislongname)
- end if
- return Lthislongname
- else
- return Lthisname
- end if
- end
-
- on mGetCurrLUShort me, pLong
- return getPropAt(iCurrentLU, getPos(iCurrentLU, pLong))
- end
-
- on mCaptureLU me, pMode, pItem, pChar
- if pItem = 1 then
- return iStoLENCa
- else
- if pItem <> iPrevItem then
- set iPrevItem to pItem
- set iENCwildLU to mLoadLU(me, pItem, pChar)
- return iENCwildLU
- else
- return iENCwildLU
- end if
- end if
- end
-
- on mLoadLU me, pItem, pAlpha
- set lit to value(field (iENCcstPtr + pItem))
- if not objectp(lit) then
- abort()
- end if
- unLoadCast(iENCcstPtr + pItem)
- return lit
- end
-